package com.iris.live.services.data.repositories;

import com.iris.live.services.data.models.SisettingModel;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 *
 */
public interface SisettingRepository extends JpaRepository<SisettingModel, Integer>, JpaSpecificationExecutor<SisettingModel> {

    @Query("select s from SisettingModel s where s.status=1")
    List<SisettingModel> findSisettingList();

    @Query("select s from SisettingModel s where s.siTypeCode=?1  and s.status=1")
    SisettingModel findSisettingByCode(String code);

}
